package com.xx.xunyou.dao.item.youlezaixiangcun;

import com.xx.xunyou.entity.item.youlezaixiangcun.YoulezaixiangcunImage;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface YoulezaixiangcunImageDAO {
    int deleteByPrimaryKey(Long imageId);

    int insert(YoulezaixiangcunImage record);

    int insertSelective(YoulezaixiangcunImage record);

    YoulezaixiangcunImage selectByPrimaryKey(Long imageId);

    int updateByPrimaryKeySelective(YoulezaixiangcunImage record);

    int updateByPrimaryKey(YoulezaixiangcunImage record);

    /**
     * 添加图片
     * @param list
     */
    void insertList(@Param("list") List<YoulezaixiangcunImage> list);

    /**
     * 通过产品id删除图片
     * @param youlezaixiangcunId
     */
    void deleteByYoulezaixiangcunId(@Param("youlezaixiangcunId") Integer youlezaixiangcunId);

    /**
     * 通过产品id查询图片
     * @param youlezaixiangcunId
     * @return
     */
    List<YoulezaixiangcunImage> queryImagesByIdToManager(@Param("youlezaixiangcunId") Integer youlezaixiangcunId);
}